/* $RCSFile: uninstall.sql $
 Apache license v2 2011 by Christian Surieux
 Removing this comment is forbiddden
 $Source: ?/AddonNice.ImageManager/PageModules/CRMImage/uninstall.sql $
 $log$
 Revision 38 2010/08/09 12:28:18  christian.surieux
   Adding Log comment to sql files
*/

IF EXISTS (SELECT * FROM sysobjects WHERE id = object_id(N'[UpdateCRMImage]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [UpdateCRMImage]
GO

IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[adn_AddCRMImage]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [adn_AddCRMImage]
GO

IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[adn_DeleteCRMImage]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [adn_DeleteCRMImage]
GO


IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[adn_GetCRMImage]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [adn_GetCRMImage]
GO

IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[adn_GetCRMImageByEntityId]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [adn_GetCRMImageByEntityId]
GO

IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[adn_GetCRMImageFull]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [adn_GetCRMImageFull]
GO

IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[adn_GetCRMImagePic]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [adn_GetCRMImagePic]
GO


IF NOT EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[adn_CRMImage]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [adn_CRMImage]
GO
